package main

import (
	"fmt"
	"github.com/gofiber/fiber"
	"gowork/cashier/controller"
	"gowork/cashier/utils"
)

func main()  {
	w := new(utils.Worker)
	for i:=1; i<=15; i++ {
		fmt.Println(w.GetId())
	}

	app := fiber.New()

	cc := new(controller.CashierController)
	app.Post("/placeAnOrder", cc.PlaceAnOrder)
	app.Post("/placeAnOrderAsync", cc.PlaceAnOrderAsync)
	app.Post("/queryPaymentMethod", cc.QueryPaymentMethod)
	app.Post("/queryCashierRule", cc.QueryCashierRule)
	app.Post("/queryIntegralRule", cc.QueryIntegralRule)
	app.Post("/insertIntegralRule", cc.InsertIntegralRule)
	app.Post("/queryCashSetting", cc.QueryCashSetting)
	app.Post("/revoke", cc.Revoke)
	app.Post("/cancellationAudit", cc.CancellationAudit)
	app.Post("/cancellationAuditAsync", cc.CancellationAuditAsync)
	app.Post("/courseConsumption", cc.CourseConsumption)
	app.Post("/courseConsumptionAsync", cc.CourseConsumptionAsync)
	app.Post("/courseRefund", cc.CourseRefund)
	app.Post("/reviewRefund", cc.ReviewRefund)

	app.Listen(7987)
}